Skip to content

Conversation

@erwango
Copy link
Member

@erwango erwango commented Jun 23, 2022

STM32_DT_CLOCKS was designed to take a device tree node label name as
argument: STM32_DT_CLOCKS(uart1)
Change its implementation to take a node identifier instead:
STM32_DT_CLOCKS(DT_NODELABEL(uart1)).

This make its usage more flexible since the argument can now be extracted
from other DT macros such as DT_PARENT. Then, the following can be done:
STM32_DT_CLOCKS(DT_PARENT(child_node_label)).

Signed-off-by: Erwan Gouriou [email protected]

@erwango erwango requested review from FRASTM and gmarull June 23, 2022 12:38
@erwango
Copy link
Member Author

erwango commented Jun 23, 2022

Required for #46703

@erwango erwango force-pushed the fix_DT_STM32_clock_macro branch from ddf1d71 to 6eb67db Compare June 23, 2022 13:27
@erwango erwango marked this pull request as ready for review June 23, 2022 13:35
@zephyrbot zephyrbot requested a review from nordic-krch June 23, 2022 13:35
gmarull
gmarull previously approved these changes Jun 23, 2022
FRASTM
FRASTM previously approved these changes Jun 23, 2022
STM32_DT_CLOCKS was designed to take a device tree node label name as
argument: STM32_DT_CLOCKS(uart1)
Change its implementation to take a node identifier instead:
STM32_DT_CLOCKS(DT_NODELABEL(uart1)).

This make its usage more flexible since the argument can now be extracted
from other DT macros such as DT_PARENT. Then, the following can be done:
STM32_DT_CLOCKS(DT_PARENT(child_node_label)).

Since it is now possible implement STM32_DT_INST_CLOCKS using
STM32_DT_CLOCKS.

Finally, update existing STM32_DT_CLOCKS users and convert
STM32_INST_CLOCK_INFO users to STM32_CLOCK_INFO.

Signed-off-by: Erwan Gouriou <[email protected]>
@erwango erwango dismissed stale reviews from FRASTM and gmarull via e32ed4e June 24, 2022 14:10
@erwango erwango force-pushed the fix_DT_STM32_clock_macro branch from 6eb67db to e32ed4e Compare June 24, 2022 14:10
@erwango erwango requested a review from ABOSTM as a code owner June 24, 2022 14:10
@zephyrbot zephyrbot added the platform: STM32 ST Micro STM32 label Jun 24, 2022
@zephyrbot zephyrbot requested a review from GeorgeCGV June 24, 2022 14:10
@erwango
Copy link
Member Author

erwango commented Jun 28, 2022

@gmarull I had to update this PR. Can you review again ?

@carlescufi carlescufi merged commit bced529 into zephyrproject-rtos:main Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants